<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta http-equiv="X-UA-Compatable" content="IE=edge,Chrome=1.0">
	<meta name="format-detection" content="telephone=no">
	<meta name="format-detection" content="email=no">   
	<title>11周年G4玩出彩</title>
	<link rel="stylesheet" href="{$_C.hy_path}css/bootstrap.min.css">
	<link rel="stylesheet" href="{$_C.hy_path}css/pic.css">
	
		<style>
		
	
.alert {
	//border:1px solid silver;
	width: 80%;
	background-color: white;
	position: fixed;
	z-index: 9999;
	top: 35%;
	left: 50%;
	margin-left: -40%;
	border-radius: 5px;
	box-shadow: 0px 0px 50px;
	text-align: center;
	display: none;
	font-size:18px;
	font-weight:500;
	text-decoration:none;
}

.alert div
{
	margin-top:10px;
	margin-bottom:20px
}

a:hover
{
	text-decoration:none;
	color:white;
}

.alert-btn {
	
	background-color: #2FF7F8;
	display: block;
	padding: 10px;
	color: #fff;
	text-decoration: none;
	border-radius: 10px;
	
}

ul.page_4 li:nth-child(2) input {
  display: block;
  width: 60%;
  height: 40px;
  background-color: transparent;
  border-style: none;
  padding-left: 20%;
}
		
	</style>
	
</head>
<body>
	<div class="wrapper" style="margin-bottom:30px">
		<div class="page_5">
			<img src="{$_C.hy_path}images/picture/p5_title.png" alt="">
			<!-- Nav tabs -->
			<ul class="nav nav-tabs" role="tablist">
			  	<li role="presentation" class="active"><a href="#bianhao" aria-controls="bianhao" role="tab" data-toggle="tab">编号排序</a></li>
			    <li role="presentation"><a href="#dianzan" aria-controls="dianzan" role="tab" data-toggle="tab">点赞排序</a></li>
			</ul>  
		    <!-- Tab panes -->
		    <div class="tab-content" id="imgList">
		    	<div role="tabpanel" class="tab-pane active" id="bianhao">
				    <ul class="tab-pane active">
				    	{foreach from=$list  item=item key=key}
				    	<li><p>{$item.id}</p><img class="lazy"  src="{$item.pic}" alt="" data_praise="{$item.praise}" data_type="{$item.id}">
				    	<span style="position:relative;display:inline-block">{$item.content}</span>
				    	</li>
				    	{/foreach}
				    </ul>
					
				</div>    
				<div role="tabpanel" class="tab-pane" id="dianzan">
					<ul class="tab-pane active">
				    	{foreach from=$list2  item=item key=key}
				    	<li>
				    	<p>{$item.id}</p>
				    	<img class="lazy" src="{$item.pic}"  data_praise="{$item.praise}"  alt="" data_type="{$item.id}">
				    	<span style="position:relative;display:inline-block">{$item.content}</span>
				    	</li>
				    	
				    	{/foreach}
				    </ul>
				</div>
		    </div>
			<!--
		    <img src="{$_C.hy_path}images/picture/p5_bottom.png" alt="">
			-->
		</div>    
		<div class="modal_wrapper hide">
			<img src="{$_C.hy_path}images/picture/cancel.png" alt="" class="cancel">
			<h1>1</h1>
			<div class="img_wrapper">
				<img id="bigImg" src="{$_C.hy_path}images/picture/dcl.png" alt="" height="80%">
				<div class="dianzan">
					<img  src="{$_C.hy_path}images/picture/p7_bottom.png" alt="" onclick="send_praise()">
					<p><span id="praise_nums">?</span>人喜欢！</p>
				</div>
			</div>
		</div>
	</div>
	
	<div class="alert" id="alert2" style="padding:15px">
		
			<div id="msg" class="fs3"></div>
			
			
			<a href="javascript:void(0)" class="alert-btn fc1 fs3">确定</a>
			
		</div>
<!-- <script src="plugin/less.min.js"></script> -->
<script>
	var pid = 0;
	
	
</script>
<script src="{$_C.hy_path}js/jquery-1.10.2.min.js"></script>
<script src="{$_C.hy_path}js/jquery.lazyload.js"></script>
<script src="{$_C.hy_path}js/bootstrap.min.js"></script>
<script src="{$_C.hy_path}js/touch.min.js"></script>
<script src="{$_C.hy_path}js/picture.js"></script>
{include file='../Common/shake-share.html'}
<script>
	
					$(document).ready(function () {
			
						var wh = $(window).height();

						var h =wh*0.7+"px";
						
						$("#bigImg").height(h);
						//$mcover.height(h+"px");
						
			$("img.lazy").lazyload({ 
placeholder : "images/lazy.png", 
effect : "fadeIn" 
}); 

			
			$('a.alert-btn').click(function (e) {
		$('div.alert').hide();
	});
	
		});
		
		
		function showMsg(msg)
	{
		$("#msg").text(msg);
					$('div#alert2').show();
	}
	
	
	function send_praise()
			{
				var url = "index.php?g=mobile&m=picture&a=send_praise";
				
			
				 
				var data = {
				pid:pid
			
			
				};
				
				$.post(url,data,function(res){
					if(res.error==0)
					{
						showMsg("点赞成功！");
						//setTimeout("window.location.href='index.php?g=mobile&m=picture&a=person';",1000);
						var praise = $("#praise_nums").text();
						$("#praise_nums").text(parseInt(parseInt(praise)+1));
					}
					else
					{
						showMsg(res.content);
					}
					
					//window.location.href="/index.php?g=home&m=plus&a=person";
				},"json");
			}
			
</script>
</body>
</html>